package cp3120.ucm.client;

import cp3120.model.Flight;
import cp3120.ucm.UCController;
import cp3120.view.FlightView;

/**
 *
 * @author Adam Scarr <scarr.adam@gmail.com>
 * PRECONDITION: A request has been made for a FlightVeiw <br>
 * POST-CONDITION: The system has displayed the flightveiw <br>
 * 1. System creates a new FlightView with a Flight<br>
 * 2. System displays the FlightVeiw<br>
 */
public class UCDisplayFlight implements UCController {
    private Flight flight;

    /**
     * Constructor
     * @param flight the Flight to be added to the FlightVeiw
     */
    public UCDisplayFlight(Flight flight) {
        this.flight = flight;
    }

    /**
     * Runs the UC
     */
    public void run() {
        FlightView flightView = new FlightView(flight, true);
        flightView.setVisible(true);
    }

}
